﻿using System.ComponentModel;
using System.Xml.Serialization;

namespace Landpy.CruiseControlNet.FacadeInterface.ConfigurationModule
{
    public class IntervalTrigger : Trigger
    {
        [Category("Basic")]
        [Description("The name of the trigger. This name is passed to external tools as a means to identify the trigger that requested the build.")]
        [DefaultValue("IntervalTrigger")]
        [XmlAttribute("name")]
        public string Name { get; set; }

        [Category("Basic")]
        [Description("The delay (in seconds) from CCNet startup to the first check for modifications. Note: Defaults to the IntervalSettings value.")]
        [XmlAttribute("initialSeconds")]
        public int InitialSeconds { get; set; }

        [Category("Basic")]
        [Description("The number of seconds after an integration cycle completes before triggering the next integration cycle.")]
        [DefaultValue(60)]
        [XmlAttribute("seconds")]
        public int Seconds { get; set; }

        public IntervalTrigger()
            : base(TriggerType.IntervalTrigger)
        {
        }
    }
}